#include <stdio.h>

int main(int argc, char *argv[]) 
{
		char c;
	int max,min,sum;
	scanf("%c",&c);
	max=min=c-'0';
	while(c!='=')
		{
			scanf("%c",&c);
			if(c>='0'&&c<='9')
			{
				if(min>c-'0')min=c-'0';
				if(max<c-'0')max=c-'0';
			}
			switch(c)
			{
				case '%':
					sum=max%min;
					printf("%d%%%d=%d\n",max,min,sum) ;break;

				case '+':
					sum=max+min;
					printf("%d+%d=%d\n",max,min,sum) ;break;
				case '-':
					sum=max-min;
					printf("%d-%d=%d\n",max,min,sum) ;break;
				case '*':
					sum=max*min;
					printf("%d*%d=%d\n",max,min,sum) ;break;
				case '/':
					if(min==0)printf("Error!\n");
					else 
						{
							sum=max/min;
							printf("%d/%d=%d\n",max,min,sum);
						};break;
			}
		}
	return 0;
}